<link href="{$base_dir}css/autocomplete.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src='{$base_dir}js/jquery.autocomplete.lhv.js'></script>
<script type="text/javascript" src='{$base_dir}modules/dept_emer/js/AJAX_EmerDeath.js'></script>

{literal}
<script type="text/javascript">

</script>
{/literal}

<div id="reportDeadInsideDiv" >
        <span class='formAlertMsg' id='statusMessage' style="padding-left: 5px;"></span>
        <form id="emerDeathFrm">
            <input type="hidden" name="patientIdHdn" id="patientIdHdn" value="{$patientId}">
            <input type="hidden" name="deathInfoIdHdn" id="deathInfoIdHdn" value="{$deathInfoId}">
		    <table class='grid' cellspacing="0" cellpadding="0">
		        <tr>
		            <td class="form_label" style='width:160px'>{translate}Patient name{/translate}:</td>
		            <td  style="width: 185px;">
		            	<input id="patientNameTxt" name="patientNameTxt" type="text" value="{$patient->getName()}" style="width: 155px;" readonly='readonly'/>
	            	</td>
	            	<td class='form_label'  style='width: 75px;'>{translate}Gender{/translate}:</td>
	            	<td>
	            		 {if $patient->getGender()=='male'}
	                     <span class='label'>{translate}Male{/translate}</span>
	                    {else}  
	                     <span class='label'>{translate}Female{/translate}
	                    {/if}  
	            	</td>
		        </tr>
		        <tr>
		            <td class="form_label">{translate}Date of birth/Age{/translate}:</td>
                    <td colspan='3'>
                        <input name="DOB_{$datePart_0}" id="DOB_{$datePart_0}" type="text" value="{$birthDays.0}" style="width: 21px;" onkeyup="return autoTab(this, 2, 'DOB_{$datePart_1}')" />
                        <span class="label">-</span>
                        <input name="DOB_{$datePart_1}" id="DOB_{$datePart_1}" type="text" value="{$birthDays.1}" style="width: 21px;" onkeyup="return autoTab(this, 2, 'DOB_yyyy')" />
                        <span class="label">-</span>
                        <input name="DOB_{$datePart_2}" id="DOB_yyyy" type="text" value="{$birthDays.2}" style="width: 40px;" onkeyup="return autoTab(this, 4, 'personAgeTxt')" />
                        <span class="label">&nbsp;/&nbsp;</span>
                        <input name="personAgeTxt" id="personAgeTxt" type="text" value="{$patient->getAge()}" style="width: 22px;"/>
                        <span style="width: 21px; color: #AAA;">({$datePart_0}-{$datePart_1}-{$datePart_2})</span>
                    </td>
                </tr>
		        <tr>
	                <td class="form_label">{translate}Career{/translate}:</td>
	                <td>
	                    <select name="careerLbx" id="careerLbx" style="width: 160px;">
	                        <option value="-1" selected="selected">- - -</option>
	                        {html_options options=$careerList selected=$patient->getCareer()}
	                   </select>
	                </td>
                    <td class="form_label">{translate}Address{/translate}</td>
                    <td><input type="text" name="addressTxt" id="addressTxt" value="{$patient->getStreet()}" style="width: 295px"></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
					<td>
					    <select name="provinceLbx" id="provinceLbx" style="width: 160px;">
					        <option value="0" label="- - -">- {translate}Province/City{/translate} -</option>
					        {html_options options=$provinceList selected=$patient->getProvinceId()}
					    </select>
					</td>
					<td colspan="2">
					    <select name="districtLbx" id="districtLbx" style="width: 160px;">
					         <option value="0" label="- - -">- {translate}District{/translate} -</option>          
					        {html_options options=$districtList selected=$patient->getDistrictId()}
					    </select>&nbsp;&nbsp;  
					    <span class='label'>{translate}Ward{/translate}:</span>&nbsp;
					    <input name="wardNameTxt" id="wardNameTxt" type="text" value="{$patient->getWardName()}" style="width: 140px;"/>
					</td>
               </tr>
               <tr>
	                <td class="form_label">{translate}Check-in time{/translate} (*):</td>
	                <td colspan="3">
	                	<input name="checkIn_{$datePart_0}" id="checkIn_{$datePart_0}" type="text" style="width: 22px;" value='{$checkInDate.0}' onkeyup="return autoTab(this, 2, 'checkIn_{$datePart_1}')" />
	                	<span class="label">-</span>
	                	<input name="checkIn_{$datePart_1}" id="checkIn_{$datePart_1}" type="text" style="width: 22px;" value='{$checkInDate.1}' onkeyup="return autoTab(this, 2, 'checkIn_{$datePart_2}')" />
	                	<span class="label">-</span>
	                	<input name="checkIn_{$datePart_2}" id="checkIn_{$datePart_2}" type="text"  style="width: 40px;" value='{$checkInDate.2}' onkeyup="return autoTab(this, 4, 'checkInTimeTxt')" />
	                	<span class="label">&nbsp;&nbsp;</span>
	                	<input name="checkInTimeTxt" id="checkInTimeTxt" type="text" style="width: 40px;" value='{$checkInTime}' />
                        <span style="width: 21px; color: #AAA;">({$datePart_0}-{$datePart_1}-{$datePart_2} hh:mm)</span>
	                </td>
                </tr>
                <tr>
                	<td class='form_label'>{translate}Department{/translate}:</td>
                	<td>
                		<span class='label'>{$department}</span>
                		<input type='hidden' id='departmentIdHdn' name='departmentIdHdn' value='{$departmentId}' />
                	</td>
                	<td class='form_label'>{translate}Patient's ID{/translate}:</td>
                	<td><span class='label'>{$patientCode}</span></td>
                </tr>
                <tr>
                    <td class="form_label">{translate}Death time{/translate} (*):</td>
                    <td colspan="3">
                        <input name="death_{$datePart_0}" id="death_{$datePart_0}" type="text" style="width: 22px;" onkeyup="return autoTab(this, 2, 'death_{$datePart_1}')" />
                        <span class="label">-</span>
                        <input name="death_{$datePart_1}" id="death_{$datePart_1}" type="text" style="width: 22px;" onkeyup="return autoTab(this, 2, 'death_{$datePart_2}')" />
                        <span class="label">-</span>
                        <input name="death_{$datePart_2}" id="death_{$datePart_2}" type="text"  style="width: 40px;" onkeyup="return autoTab(this, 4, 'deathTimeTxt')" />
                        <span class="label">&nbsp;&nbsp;</span>
                        <input name="deathTimeTxt" id="deathTimeTxt" type="text" style="width: 40px;"/>
                        <span style="width: 21px; color: #AAA;">({$datePart_0}-{$datePart_1}-{$datePart_2} hh:mm)</span>
                    </td>
                </tr><tr>
                    <td class="form_label">{translate}Checkout death time{/translate} (*):</td>
                    <td colspan="3">
                        <input name="checkOutDeath_{$datePart_0}" id="checkOutDeath_{$datePart_0}" type="text" style="width: 22px;" onkeyup="return autoTab(this, 2, 'checkOutDeath_{$datePart_1}')" />
                        <span class="label">-</span>
                        <input name="checkOutDeath_{$datePart_1}" id="checkOutDeath_{$datePart_1}" type="text" style="width: 22px;" onkeyup="return autoTab(this, 2, 'checkOutDeath_{$datePart_2}')" />
                        <span class="label">-</span>
                        <input name="checkOutDeath_{$datePart_2}" id="checkOutDeath_{$datePart_2}" type="text"  style="width: 40px;" onkeyup="return autoTab(this, 4, 'checkOutDeathTimeTxt')" />
                        <span class="label">&nbsp;&nbsp;</span>
                        <input name="checkOutDeathTimeTxt" id="checkOutDeathTimeTxt" type="text" style="width: 40px;"/>
                        <span style="width: 21px; color: #AAA;">({$datePart_0}-{$datePart_1}-{$datePart_2} hh:mm)</span>
                    </td>
                </tr>
                <tr>
                	<td class='form_label'>{translate}Preside{/translate} (*):</td>
                	<td><input type='text' style='width: 155px' id='presideTxt' name='presideTxt' /></td>
                	<td class='form_label'>{translate}Secretary{/translate} (*):</td>
                	<td><input type='text' style='width: 155px' id='secretaryTxt' name='secretaryTxt' /></td>
                </tr> 
                <tr>
                    <td class="form_label">{translate}Participants{/translate}:</td>
                    <td colspan="3"><textarea name="participantTxt" id="participantTxt" rows="2" style="width: 424px;"></textarea></td>
                </tr> 
                <tr>
                    <td class="form_label">{translate}Summary of treatment process{/translate}:</td>
                    <td colspan="3"><textarea rows="1" style="width: 424px;" name="medicaTxt" id="medicaTxt"></textarea> </td>
                </tr>
                <tr>
                    <td class="form_label">{translate}Conclusion{/translate}:</td>
                    <td colspan="3"><textarea rows="1" style="width: 424px;" name="conclusionTxt" id="conclusionTxt"></textarea> </td>
                </tr>    
		    </table>      
        </form>
</div>